package com.hu.bgp.framework.clientapi;

import com.google.gwt.user.client.rpc.AsyncCallback;

/**
 * Util om onFailure() globaal op de vangen.
 * 
 * @author ejvos
 */
public abstract class FailureHandlingCallback<T> implements AsyncCallback<T>
{
	private FailureHandler fh;

	public FailureHandlingCallback(FailureHandler fh)
	{
		this.fh = fh;
	}

	public final void onFailure(Throwable caught)
	{
		fh.onFailure(caught);
	}

	public abstract void onSuccess(T result);
}
